Auto merge of #2482 - ryanq:issue2266, r=alexcrichton
authorbors <bors@rust-lang.org>
Fri, 18 Mar 2016 17:49:04 +0000 (10:49 -0700)
committerbors <bors@rust-lang.org>
Fri, 18 Mar 2016 17:49:04 +0000 (10:49 -0700)
Suggest the best matching target for cargo run

Targets passed to cargo compile are validated against the package. If
the target exists, it is compiled. If not, cargo will bail and offer a
suggested target name if there is a close match.

The tests create and build/run binaries and examples using filenames
that are close (or not so close) to the target names to verify that
close matching names are suggested to the user.

Sample output attached.
<img width="838" alt="screen shot 2016-03-14 at 12 32 59 pm" src="https://cloud.githubusercontent.com/assets/124247/13754913/28490e42-e9ef-11e5-9617-8d3c01106527.png">

Closes #2266


Trivial merge